package com.statistics.tools;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;

/**
 * @author MeowParse
 * @date 2017/9/1.
 */
public class SaveRecords {

	public static void save(Object o, List list) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
		Class clazz = o.getClass();
		Method method = clazz.getMethod("save");
		method.setAccessible(true);
		method.invoke(list);
	}

}
